<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">

		<ul class="nav nav-tabs">
			<li><a href="{:U('Goods/hpage_list')}">首页轮播设置</a></li>
			<if condition="$list['id']">
			<li class="active"><a>首页图片编辑</a></li>
			<else/>
			<li class="active"><a>首页图片添加</a></li>
			</if>
		</ul>
        <form class="form-horizontal js-ajax-forms" action="{:U('Goods/hpage_edit_act')}" method="post">
			<fieldset>
				<div class="tabbable">
					<div class="tab-content">
							<fieldset>
								<div class="control-group">
									<label class="control-label">商品id</label>
									<div class="controls"><input type="text" name="goods_id" value="{$list.goods_id}">*关联商品id 非必填</div>
									<input type="hidden" name="id" value="{$list['id']|default=''}">
								</div>
								<div class="control-group">
									<label class="control-label">跳转地址</label>
									<div class="controls"><input type="text" name="jump" value="{$list.jump}">* 非必填</div>
								</div>
								<div class="control-group">
									<label class="control-label">首页图片</label>
									<div class="controls">
										<div>
											<input type="hidden" name="thumb" id="thumb" value="{$list['url']|default=''}">
											<a href="javascript:upload_one_image('图片上传','#thumb');">
												<if condition="empty($list['url'])">
													<img src="__TMPL__Public/assets/images/default-thumbnail.png" id="thumb-preview" width="135" style="cursor: hand"/>
												<else />
													<img src="{:sp_get_image_preview_url($list['url'])}" id="thumb-preview" width="135" style="cursor: hand"/>
												</if>
											</a>
											<input type="button" class="btn btn-small" onclick="$('#thumb-preview').attr('src','__TMPL__Public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;" value="取消图片">
										</div>
									</div>
								</div>
							</fieldset>
					</div>
				</div>

				<div class="form-actions">
					<button type="submit" class="btn btn-primary  js-ajax-submit">{:L("SAVE")}</button>
				</div>
			</fieldset>
		</form>
		
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>